﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
namespace DAO
{
    public class HangSanXuatDAO
    {
        public static List<HangSanXuat> LayTenHangSanXuat(int LoaiSP)
        {
            List<HangSanXuat> kq = new List<HangSanXuat>();
            DNQCDataContext dc = new DNQCDataContext();
            var v = from hsx in dc.HangSanXuats where hsx.LoaiSanPham == LoaiSP select hsx;
            foreach (HangSanXuat item in v)
            {
                kq.Add(item);
            }
            return kq;
        }
        public IEnumerable<HangSanXuat> LayDanhSachHsx()
        {
            DNQCDataContext dc = new DNQCDataContext();
            var v = from hsx in dc.HangSanXuats select hsx;
            return v;
        }
        
    }
}
